/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package VectorMathTests;

import GameEngine.GameConstants.Graphic;
import GameEngine.Vector;
import Objects.GameObject;

/**
 * Tests for the validity of GameObject's "contains()" function
 * @author jh20
 */
public class TestTwo {

    public static void main(String[] args) {
        // should all return true
        GameObject obj1 = new GameObject(new Vector(1, 0), new Vector(0, 0), new Vector(8,8), Graphic.PINKPLAYER_WALK);
        System.out.println(obj1.contains(2, 2));
        System.out.println(obj1.contains(-2, -2));
        System.out.println(!obj1.contains(5, 5));
        System.out.println();

        // now try diagonal
        obj1 = new GameObject(new Vector((float) (1/Math.sqrt(2)), (float) (-1/Math.sqrt(2))), new Vector(3, 3), new Vector(1,1), Graphic.PINKPLAYER_WALK);
        System.out.println(obj1.contains(3, 3));
        System.out.println(obj1.contains((float) 3.5, 3));
        System.out.println(!obj1.contains(4, 4));
    }

}
